let express = require('express');
let cors = require('cors');
let path = require('path');
let mustacheExpress = require('mustache-express');
let apiMember = require('./api/member');
let routerIndex = require('./routes/index');

let app = express();

app.engine( "mustache", mustacheExpress() );
app.set('views', './views');
app.set('view engine', 'mustache')

app.use('/api/', cors(), function (req, res, next){
	next();
});

app.use('/api/member', apiMember);

app.use('/', routerIndex);
app.use('/index', routerIndex);

app.listen(4200);
